<!doctype html>
<html>
<head>
	<meta charset="utf-8">
	<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0,user-scalable=no">
		<meta name="mobileOptimized" content="width">
		<meta name="handheldFriendly" content="true">
		<meta name="format-detection" content="telephone=no">
		<meta name="apple-touch-fullscreen" content="yes">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="Cache-Control" content="max-age=0">
		<meta http-equiv="expires" content="0">
	<title>用户登录</title>
	<link rel="stylesheet" type="text/css" href="css/style.css" >
	<style>body{background:url(images/bg-loader.jpg) no-repeat; background-size:100% 100%;}.foot a{ color: #fff;}</style>
	<style type="text/css" >
	.jjr-register{background: url(images/old-register.png) no-repeat;background-size: 47%;}
	#J_login{margin-top: 100px;}
	</style>
	<script type="text/javascript">
     
	function myFunction(){
		var name=document.getElementById("username").value;
		var password=document.getElementById("password").value;

		if (checkName(name)){
			if (checkPassword(password)){}
		}
	}
	function checkName(name){
		var re = /^$/
		if (re.test(name)){
			alert("请输入正确的用户名");
			return false;
		}
		else{
			return true;
		}
	}
	function checkPassword(password){
		var re = /^\d{6,8}$/
		if (re.test(password)){
			return true;
		}
		else{
			alert("请输入正确的密码");
			return false;
		}
	}
    </script>

</head>
<body>

<section class="main animated fadeInDown">
	<div class="main-box" action="#" name="form1" onsubmit="return check(this);">
		<h1 class="jjr-register"></h1>
		<p class="rb-row"><input type="text" class="input"  name="username" id="username" placeholder="请输入用户名" /></p>
		<p class="rb-row"><input type="password"  pattern="[0-9]*"  class="input"  name="password" id="password" placeholder="请输入密码6~8个数字"  /></p>
		<p class="login-btn"><input type="submit" value="登录" onclick="myFunction()" class="btn submit-btn" id="J_login" /></p>
	</div>
	</div>
</section>
	<footer class="foot"><a>©美的地产 </a></footer>	
</body>
</html>